<?php /* Smarty version Smarty-3.1.18, created on 2017-07-22 21:16:50
         compiled from "/Applications/MAMP/htdocs/PHP/jifenshop/protected/template/wap/address.get_address.html" */ ?>
<?php /*%%SmartyHeaderCode:58156071359735039229906-54489372%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'f39c398ca07a1c3921eb5c3b8a42aaf6e293bf54' => 
    array (
      0 => '/Applications/MAMP/htdocs/PHP/jifenshop/protected/template/wap/address.get_address.html',
      1 => 1500729409,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '58156071359735039229906-54489372',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.18',
  'unifunc' => 'content_597350392aa671_09201658',
  'variables' => 
  array (
    'data' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_597350392aa671_09201658')) {function content_597350392aa671_09201658($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<body class="gr">

<div class="navBar">
	<a class="left" href="javascript:history.back()"><i class="return"></i></a>
	<div class="titleView">编辑收货地址</div>
</div>

<div class="address-info main-top">
	<form action="api.php?app=address&act=edit_address" method="post">
	<input type="hidden" name="goalert" value="修改成功" />
	<input type="hidden" name="gourl" value="wap.php?app=address&act=list_address" />
	<input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->id;?>
" />
	<ul class="tableView tableView-light">
		<li>
			<h1>
				<div class="row">
					<span>收货人姓名</span>
					<input type="text" name="contactman" id="contactman" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->contactman;?>
" />
				</div>
			</h1>
		</li>
		<li>
			<h1>
				<div class="row">
					<span>手机号码</span>
					<input type="tel" name="mobile" id="mobile" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->mobile;?>
" />
				</div>
			</h1>
		</li>
		<li>
			<h1 class="push-ico">
				<div class="row">
					<span>所在地区</span>
					<div class="selects selects-x">
						<div><?php echo $_smarty_tpl->tpl_vars['data']->value->province;?>
<?php if ($_smarty_tpl->tpl_vars['data']->value->province!=$_smarty_tpl->tpl_vars['data']->value->city) {?><?php echo $_smarty_tpl->tpl_vars['data']->value->city;?>
<?php }?><?php echo $_smarty_tpl->tpl_vars['data']->value->district;?>
</div>
						<select name="province" id="province" onchange="changeProvince({ province:'#province',city:'#city',district:'#district',applyName:true })"></select>
						<select name="city" id="city" onchange="changeCity({ city:'#city',district:'#district',applyName:true })"></select>
						<select name="district" id="district"></select>
					</div>
				</div>
			</h1>
		</li>
		<li>
			<h1>
				<div class="row">
					<span>地址</span>
					<input type="text" name="address" id="address" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->address;?>
" />
				</div>
			</h1>
		</li>
		<li>
			<h1>
				<div class="row">
					<span>身份证号码</span>
					<input type="tel" name="idcard" id="idcard" value="<?php echo $_smarty_tpl->tpl_vars['data']->value->idcard;?>
" maxlength="18" />
				</div>
			</h1>
		</li>
	</ul>
	</form>
	<div class="buttonView">
		<a class="btn" href="javascript:void(0)">确定</a>
	</div>
</div>

<?php echo $_smarty_tpl->getSubTemplate ("footer.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<script type="text/javascript" src="js/city.js"></script>
<script>
$(function(){
	$('#contactman').placeholder('请输入收货人姓名');
	$('#mobile').placeholder('请输入手机号码');
	$('#address').placeholder('请输入地址');
	$('#idcard').placeholder('请输入身份证号码');
	$('.buttonView .btn').click(function(){
		if (!$('#contactman').val().length || !$('#mobile').val().length || !$('#address').val().length || !$('#idcard').val().length) {
			$.overloadError('请填写完整');
			return;
		}
		$('form').submit();
	});
	
	tipShow = false;
	showCity({ province:'#province', city:'#city', district:'#district', applyName:true, provincename:'<?php echo $_smarty_tpl->tpl_vars['data']->value->province;?>
', cityname:'<?php echo $_smarty_tpl->tpl_vars['data']->value->city;?>
', districtname:'<?php echo $_smarty_tpl->tpl_vars['data']->value->district;?>
' });
	$('.address-info .selects').onclick(function(){
		$.actionpicker({
			title : '请选择地区',
			rightBtn : {
				text : '确定',
				click : function(){
					$('.selects').append(this.find('select'));
					$.actionpicker();
				}
			},
			before : function(){
				this.append($('.selects').find('select'));
				this.selectpicker({
					cls : 'areapicker',
					autoWidth : false,
					select : function(component, row){
						var html = comboCity($('#province').selected().val(), $('#city').selected().val(), $('#district').selected().val());
						$('.address-info .selects').addClass('selects-x');
						$('.address-info .selects div').html(html);
					},
					complete : function(){
						var html = comboCity($('#province').selected().val(), $('#city').selected().val(), $('#district').selected().val());
						$('.address-info .selects').addClass('selects-x');
						$('.address-info .selects div').html(html);
					}
				}, this.find('#province'), this.find('#city'), this.find('#district'));
			},
			close : function(){
				$('.selects').append(this.find('select'));
			}
		});
	});
});
</script><?php }} ?>
